﻿.form-check {
    --bb-checkbox-label-padding-y: 6px;
    --bb-checkbox-height: 1rem;
    --bb-checkbox-sm-height: 1.25rem;
    --bb-checkbox-md-height: 1.5rem;
    --bb-checkbox-lg-height: 1.75rem;
    --bb-checkbox-xl-height: 2rem;
    --bb-checkbox-xxl-height: var(--bb-height);
    --bb-checkbox-input-focus-border-color: #b5b5c3;
    --bb-checkbox-item-disabled-opacity: 0.5;
    --bb-checkbox-item-padding-md: 4px 0 3px 0;
    --bb-checkbox-item-padding-lg: 2px 0 1px 0;
    --bb-checkbox-item-padding-xl: 2px 0 1px 0;
    padding: 0;
    margin: 0;
    min-height: 1rem;
}

    .form-check .form-check-input {
        width: var(--bb-checkbox-height);
        height: var(--bb-checkbox-height);
        margin: 3px 0 1px 0;
        transition: background-color .15s ease-in-out,background-position .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;
    }

        .form-check .form-check-input + .form-check-label {
            text-overflow: ellipsis;
            white-space: nowrap;
            overflow: hidden;
            vertical-align: top;
            margin-left: .5rem;
            flex: 1;
        }

.form-label + .form-check {
    padding: var(--bb-checkbox-label-padding-y) 0;
}

.form-check-input:active {
    filter: none;
}

@media (prefers-reduced-motion:reduce) {
    .form-check-input {
        transition: none
    }
}

.form-check-input:focus {
    border-color: var(--bb-checkbox-input-focus-border-color);
    box-shadow: none
}

.form-check-input:checked {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary)
}

.form-check-input[type=checkbox]:indeterminate {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}

.form-check-input:disabled {
    pointer-events: none;
    filter: none;
    opacity: var(--bb-checkbox-item-disabled-opacity);
}

    .form-check-input:disabled ~ .form-check-label,
    .form-check-input[disabled] ~ .form-check-label {
        opacity: var(--bb-checkbox-item-disabled-opacity);
    }

.form-check .form-check-input {
    cursor: pointer;
}

.form-check.form-check-success .form-check-input:checked {
    background-color: var(--bs-success);
}

.form-check.form-check-danger .form-check-input:checked {
    background-color: var(--bs-danger);
}

.form-check.form-check-warning .form-check-input:checked {
    background-color: var(--bs-warning);
}

.form-check.form-check-info .form-check-input:checked {
    background-color: var(--bs-info);
}

.form-check.form-check-primary .form-check-input:checked {
    background-color: var(--bs-primary);
}

.form-check.form-check-secondary .form-check-input:checked {
    background-color: var(--bs-secondary);
}

.form-check.form-check-dark .form-check-input:checked {
    background-color: var(--bs-dark);
}

.form-check.form-check-sm .form-check-input {
    height: var(--bb-checkbox-sm-height);
    width: var(--bb-checkbox-sm-height);
    margin: 0;
}

.form-check.form-check-md {
    padding: var(--bb-checkbox-item-padding-md);
}

    .form-check.form-check-md .form-check-input {
        height: var(--bb-checkbox-md-height);
        width: var(--bb-checkbox-md-height);
    }

.form-check.form-check-lg {
    padding: var(--bb-checkbox-item-padding-lg);
}

    .form-check.form-check-lg .form-check-input {
        height: var(--bb-checkbox-lg-height);
        width: var(--bb-checkbox-lg-height);
    }

.form-check.form-check-xl {
    padding: var(--bb-checkbox-item-padding-xl);
}

    .form-check.form-check-xl .form-check-input {
        height: var(--bb-checkbox-xl-height);
        width: var(--bb-checkbox-xl-height);
        margin: 0;
    }

.form-check.form-check-xxl {
    padding: 0;
}

    .form-check.form-check-xxl .form-check-input {
        height: var(--bb-checkbox-xxl-height);
        width: var(--bb-checkbox-xxl-height);
        margin: 0;
    }

.form-check.is-label {
    display: inline-flex;
    align-items: center;
}

    .form-check.is-label .form-check-input {
        margin: 0;
    }
